<template>
  <el-dialog
    :destroy-on-close="false"
    :show-close="false"
    v-model="dialogVisible"
    align-center
    width="908"
  >
    <div class="container">
      <img class="close" src="~/assets/img/close.png" alt="" />
      <div class="header">二维码</div>
      <div class="box">
        <div class="steps">
          <div class="step1">01 保存二维码</div>
          <div class="step2">02 打开手淘TBapp</div>
          <div class="step3">03 选择二维码识别</div>
        </div>
        <div class="img-list">
          <div class="card card1">
            <div class="code"></div>
            <div class="desc">点击图片识别</div>
          </div>
          <div class="card card2">
            <img src="~/assets/img/img1.png" alt="" />
            <div class="desc">点击左上角扫一扫</div>
          </div>
          <div class="card card3">
            <img src="~/assets/img/img2.png" alt="" />
            <div class="desc">
              <div>点击图片识别</div>
              <div>保存二维码即可显示</div>
            </div>
          </div>
        </div>
        <div class="footer">
          <el-button class="save">保存二维码</el-button>
        </div>
      </div>
    </div>
  </el-dialog>
</template>

<script setup>
const dialogVisible = ref(false);
</script>

<style lang="scss" scoped>
.container {
  height: 553px;
  background: #ffffff;
  border-radius: 10px;
  position: relative;
  .close {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 20px;
    right: 20px;
  }
  .header {
    height: 68px;
    background: #fff3ec;
    border-radius: 10px 10px 0px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 400;
    color: #333333;
  }
  .box {
    padding: 20px;
    .steps {
      display: flex;
      align-items: center;
      .step1 {
        width: 304px;
        height: 52px;
        background: url("~/assets/img/step1.png") no-repeat;
        background-size: 100% 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 500;
        text-align: LEFT;
        color: #ffffff;
      }
      .step2 {
        background: url("~/assets/img/step2.png");
        width: 304px;
        height: 52px;
        background-size: 100% 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 500;
        text-align: LEFT;
        color: #ffffff;
      }
      .step3 {
        background: url("~/assets/img/step3.png");
        width: 304px;
        height: 52px;
        background-size: 100% 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 500;
        text-align: LEFT;
        color: #ffffff;
      }
    }
    .img-list {
      margin-top: 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .card {
        width: 276px;
        height: 309px;
        background: #ffffff;
        border: 1px solid #f2f2f2;
        padding: 20px;
      }
      .card1 {
        .code {
          width: 236px;
          height: 236px;
          background: #ccc;
        }
        .desc {
          height: 22px;
          font-size: 14px;
          font-weight: 500;
          text-align: LEFT;
          color: #666666;
          line-height: 19px;
          margin-top: 20px;
          text-align: center;
        }
      }
      .card2 {
        > img {
          margin: 50px auto;
        }
        .desc {
          text-align: center;
          font-size: 14px;
          font-weight: 500;
          color: #666666;
          line-height: 19px;
        }
      }
      .card3 {
        > img {
          margin: 50px auto;
        }
        .desc {
          text-align: center;
          font-size: 14px;
          font-weight: 500;
          color: #666666;
          line-height: 19px;
        }
      }
    }
    .footer {
      margin-top: 20px;
      display: flex;
      justify-content: center;
      align-items: center;
      ::v-deep .el-button.save {
        width: 240px;
        height: 44px;
        background: #ff5500;
        border-radius: 5px;
        color: #fff;
        font-size: 16px;
      }
    }
  }
}
</style>
